<?php

/**
 * ZonasViviendas filter form base class.
 *
 * @package    costabravasfr
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseZonasViviendasFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'municipio'    => new sfWidgetFormFilterInput(array('with_empty' => false)),
      'zona_desc_ca' => new sfWidgetFormFilterInput(),
      'zona_desc_es' => new sfWidgetFormFilterInput(),
      'zona_desc_en' => new sfWidgetFormFilterInput(),
      'zona_desc_nl' => new sfWidgetFormFilterInput(),
      'zona_desc_fr' => new sfWidgetFormFilterInput(),
      'slug'         => new sfWidgetFormFilterInput(),
    ));

    $this->setValidators(array(
      'municipio'    => new sfValidatorPass(array('required' => false)),
      'zona_desc_ca' => new sfValidatorPass(array('required' => false)),
      'zona_desc_es' => new sfValidatorPass(array('required' => false)),
      'zona_desc_en' => new sfValidatorPass(array('required' => false)),
      'zona_desc_nl' => new sfValidatorPass(array('required' => false)),
      'zona_desc_fr' => new sfValidatorPass(array('required' => false)),
      'slug'         => new sfValidatorPass(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('zonas_viviendas_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'ZonasViviendas';
  }

  public function getFields()
  {
    return array(
      'zona'         => 'Text',
      'municipio'    => 'Text',
      'zona_desc_ca' => 'Text',
      'zona_desc_es' => 'Text',
      'zona_desc_en' => 'Text',
      'zona_desc_nl' => 'Text',
      'zona_desc_fr' => 'Text',
      'slug'         => 'Text',
    );
  }
}
